﻿
@{
    ViewBag.Title = "我的上传";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<el-row :gutter="20">
    <el-col :span="4" class="imagebox" v-for="(file,index) in files" :key="file.FileId" style="cursor:pointer;">
        <el-card :body-style="{ padding: '0px' }">
            <img :src="file.FileUrl" class="image" style="height:200px;">
            <div style="padding: 14px;">
                <div style="text-align:left;"><span>{{file.FileKey}}</span></div>
                <div class="bottom clearfix">
                    <time class="time">{{ file.UploadDate}}</time>
                    @*<el-button type="text" class="button" style="margin-left:5px;">编辑</el-button>*@
                    <el-button type="text" class="button" @@click="delAlbum(file.FileId)">复制</el-button>
                </div>
            </div>
        </el-card>
    </el-col>
</el-row>
@section styles{
    <style>
        .el-main {
            padding: 30px 12%;
        }
    </style>
}
@section scripts{
    <script type="text/javascript">
        new Vue({
            el: "#app",
            data: {
                defaultalbum: '默认相册',
                dropalbums: [],
                limit: 10,
                ismultiple: false,
                isshowfilelist: true,
                activeIndex: '2',
                loging: false,
                albumId: 0,
                files: []
            },
            methods: {
                handleSelect(key, keyPath) {
                    var self = this;
                    skipPage(self, key);
                },
                getfiles() {
                    var self = this;
                    Axios.get(self, '/main/myfiles', {
                        data: {
                            albumId: self.albumId
                        },
                        success(res) {
                            console.log(res)
                            self.files = res.data;
                        }
                    });
                },
                delAlbum(id) {
                    console.log(id)
                    var self = this;
                    showMessage(self, '提示：复制功能开发中...', true, 'warning');
                }
            },
            created() {
                var self = this;
                PF.dropdownalbums(self);
                self.albumId=@ViewBag.AlbumId;
                self.getfiles();
            }
        });
    </script>
}

